package com.lucenly.spell.fragment

import android.view.LayoutInflater
import android.view.ViewGroup
import androidx.recyclerview.widget.LinearLayoutManager
import com.lucenly.spell.R
import com.lucenly.spell.adapter.HomeItemAdapter
import com.lucenly.spell.base.BaseFragment
import com.lucenly.spell.databinding.FragmentItemHomeBinding

class HomeItemFragment(var color: Int) : BaseFragment<FragmentItemHomeBinding>(R.layout.fragment_item_home) {
    override fun getViewBinding(
        inflater: LayoutInflater,
        container: ViewGroup?
    ): FragmentItemHomeBinding {
        return FragmentItemHomeBinding.inflate(inflater)
    }

    override fun initData() {
        var list = arrayListOf<Int>()
        for (i in 1..10){
            list.add(i)
        }
//        binding.content.setBackgroundColor(color)
        binding.recyclerView.layoutManager = LinearLayoutManager(context)
        binding.recyclerView.adapter = HomeItemAdapter(list,context!!)
    }

    override fun initEvent() {
    }

    override fun startObserve() {
    }

}